<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
	<title>修改密码</title>
	<meta charset="UTF-8">
	<link rel="stylesheet" type="text/css" href="css/public.css">
	<link rel="stylesheet" type="text/css" href="css/common.css">
	<link rel="stylesheet" type="text/css" href="css/address.css">
</head>
<body>
	
	<jsp:include page="header.jsp"/>
	
	<div id="main">
	
		<div class="new-address">
			<form method="post"  action="passwordUpdate.do" class="registerform">
				<div class="box clearfix">
					<div class="left">
						<span>原密码&nbsp;：&nbsp;</span>
					</div>
					<div class="right">
						<input id="i1" type="password" name="password" value="" required="required" placeholder="请输入原密码">
					<span class="Validform_checktip" id="s1"></span></div>
				</div>
				<div class="box clearfix">
					<div class="left">
						<span>新密码&nbsp;：&nbsp;</span>
					</div>
					<div class="right">
						<input type="password" id="i2" name="passwordNew" value="" required="required" placeholder="请输入新密码">
					<span class="Validform_checktip" id="s2"></span></div>
				</div>
				<div class="save" style="padding-left: 65px;">
					<button>保存</button>
					<p style="color:green;">${msg}</p>
				</div>
			</form>
		</div>
		
	</div>

	<jsp:include page="footer.jsp"/>

</body>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
	$("#i1").blur(function(){
		var pwd1='${user.password}';
		var pwd2=$("#i1").val();
		console.log(pwd1+"~"+pwd2)
		$("#s1").text("");
		if(pwd1!=pwd2){
			$("#s1").text("原密码输入错误");
		}
		
	})
	$("#i2").blur(function(){
		var pwd1=$("#i1").val();
		var pwd2=$("#i2").val();
		$("#s2").text("");
		if(pwd1==pwd2){
			$("#s2").text("与原密码一致");
		}
		
	})
</script>
</html>